home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DO1002.ARJ
/
CD.SCR
< prev
next >
Wrap
Text File
|
1991-12-10
|
2KB
|
61 lines
.pg wi full clr
»cy«COMMAND NAME»gray«: »%t« ChangeDir»ye«
/CD {directory} [N]
/cw
Change directories to »cy«{directory}»#«.
The »%t«ChangeDir»#« command is the equivalent of DOS' »gr«CD»#« command.
Any variables in »cy«{directory}»#« are expanded before the command
is executed. »cy«{directory}»#« must be a valid DOS sub-directory
after the expansion of any variables.
After the execution of the ChangeDir command, »%t«DO»#« branches to
one of two labels:
»cy«:CDOK»#« The ChangeDir command was successfully executed.
»cy«:CDERROR»#« The ChangeDir command was NOT successfully
executed. That is »%t«DO»#« was unable to change to the
indicated directory.
If the "»ye«N»#«" token is included, the command will »+re«NOT»#« branch to the
labels, but will continue on the next line of the script regardless
of the outcome.
.pg clr
In the following examples, press »bo«<enter>»#« to execute each
displayed line.
We'll change to the »wh«root directory»#« of your disk using
this command:
|/CD \
:CDERROR
.clr
Well, that didn't work. Do do sent us to the »cy«:CDERROR»#« label!
.pg
/GOTO CD2
:CDOK
.clr
Now, we'll do a directory command to verify that everything went
OK. Press »bo«<ESC>»#« when you are finished viewing the directory.
.pg
/DIR
.wi 1 5 79 22 clr
»%t«DO»#« remembers where it started. The keyword »ye«HOME»#« tells »%t«DO»#« to return
to it's starting directory.
Notice because of the "»cy«N»#«" token, the command will »+re«NOT»#« branch to
the label since we know that we can find our way home and would
go to the same place in the script regardless of the outcome of
the command.
|/CD HOME N
Here's another directory command to make sure that we made it back
all right. Press »bo«<ESC>»#« when you are finished viewing the directory.
.pg
/dir
:CD2
/ENDEXEC CLEAR